package com.nuanshui.heatedloan.controller.display.users.apply;

import java.util.List;
import com.alibaba.dubbo.config.annotation.Reference;
import com.nuanshui.heatedloan.constant.GlobalParam;
import com.nuanshui.heatedloan.pageable.Pager;
import org.springframework.data.domain.Pageable;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.nuanshui.framework.utils.LogUtil;
import com.nuanshui.heatedloan.baseservice.facade.userapply.OpinionService;
import com.nuanshui.heatedloan.baseservice.model.Opinion;
import com.nuanshui.heatedloan.controller.BaseController;

/**
 * 反馈意见管理
 * @author Junyan2015
 *
 */
@RestController
@RequestMapping("/manage/opinion/")
public class OpinionController extends BaseController{

	@Reference(url = GlobalParam.BASESERVICE_DUBBO_SERVER, timeout = GlobalParam.DUBBO_SERVER_TIME_OUT,version = GlobalParam.USER_DUBBO_SERVER_VERSION)
	private OpinionService opinionService;

	/**
	 * 保存意见反馈信息
	 * 
	 * @param
	 * @author guohao
	 * @date 2015年6月3日 下午3:33:20
	 */
	@RequestMapping(value = "/saveOpinion",method = RequestMethod.POST)
	public String saveOpinion(Opinion opinion, Errors errors) {
		LogUtil.info(log, "保存反馈的意见信息");
		ControllerHelper.checkException(errors);
		opinionService.saveOpinion(opinion);
		return success(true);
	}
}
